import { INIT_AIRDATA_ACTION } from "./action";
import axios from "axios";
export const initAirDataAction = (data) => ({
  type: INIT_AIRDATA_ACTION,
  data,
});
const iniData = {
    selectDate: '06-21',
    type: 1,
    sort: 'asc'
}
export const getAirList = (solus=iniData) => {
  return (dispatch) => {
    axios({
      url: "/airPlaneList",
      method: "post",
      data: solus,
    }).then(async (res) => {
      const data = res.data;
      const action = initAirDataAction(data);
      dispatch(action);
    });
  };
};
